<!doctype html>
<html>
<head>
<title></title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
<link rel="stylesheet" href="../res/css/weui.css"/>
<link rel="stylesheet" href="../res/css/weuix.css"/>
<link rel="stylesheet" href="../res/css/common.css" />
<script src="../res/js/zepto.min.js"></script>
<script src="../res/js/zepto.weui.js"></script>
<script src="../res/js/common.js?v=1"></script>
<link rel="stylesheet" href="https://cdn.bootcss.com/weui/1.1.3/style/weui.min.css">
<script src="" type="text/javascript" charset="utf-8"></script>
<script>
	var doctor_id = getQst("doctor_id");
	
	function getCommit(){
		var paramJson = {
			"current": 1,
			"doctorId": doctor_id,
			"size": 200
		};
		newAjaxPost("/h5/doctorInfo/getDoctorEvaluateList", paramJson, getCommitOK);
		return false;
	}
	function getCommitOK(jsonInfo){
		let data = [];
		let commitList = [];
		if(jsonInfo.code=='1'){
			data = jsonInfo.data.list;
			if(data.length>0){
				for(var i=0;i<data.length;i++){
					if(data[i].patientName==null){
						data[i].patientName='匿名'
					}
					if(data[i].evaluateStr=='非常满意'){
						commitList+='<div class="info_content"><div class="info_isonline">'+data[i].patientName+'</div><div class="info_com vg">非常满意</div><div class="info_time">'+data[i].createTime+'</div></div>'
					}else if(data[i].evaluateStr=='满意'){
						commitList+='<div class="info_content"><div class="info_isonline">'+data[i].patientName+'</div><div class="info_com og">满意</div><div class="info_time">'+data[i].createTime+'</div></div>'
					}else if(data[i].evaluateStr=='基本满意'){
						commitList+='<div class="info_content"><div class="info_isonline">'+data[i].patientName+'</div><div class="info_com sg">基本满意</div><div class="info_time">'+data[i].createTime+'</div></div>'
					}else if(data[i].evaluateStr=='不满意'){
						commitList+='<div class="info_content"><div class="info_isonline">'+data[i].patientName+'</div><div class="info_com ng">不满意</div><div class="info_time">'+data[i].createTime+'</div></div>'
					}
				}
			}else{
				commitList+='<div class="info_content" style="text-align:center">暂无患者评论</div>'
			}
			$('.weui-cells').html(commitList);
		}
	}
	

    $(function () {
        doctor_id = getQst("doctor_id");
		getCommit()
		
		$('#btnBack').on("click", function () {
		    history.go(-1);
		});
    });
</script>
<style>
    .fixed-top {  position: fixed; left: 0; top: 0; right: 0; z-index: 5;  }
	.weui-btn_primary:not(.weui-btn_disabled):active {
	    background-color: #ffffff;
	}
	
	.weui-btn_primary {
	    background-color: #ffffff;
	}
	
	.block{ font-size: 14px;margin:50px 10px;}
	.weui-cells{padding: 0 10px;border-radius: 10px;}
	.info_content{
		border-bottom: 1px solid #E0E0E0;
		padding: 10px 0;
	}
	.info_content:last-child{
		border-bottom: 0px;
	}
	.info_isonline{display: inline-block;}
	.info_com{
		color: #1189ff;
		background-color: #ECF6FF;
		display: unset;
		padding: 2px 5px;
		border-radius: 7px;
		margin-left: 10px;
		font-size: 12px;
	}
	.og{color: #4AA95C;background-color: #F1F8F2;}
	.sg{color: #ECA02C;background-color: #FEF8EE;}
	.ng{color: #FA6464;background-color: #FFF3F3;}
	.info_time{
		display: inline-block;
		float: right;
		color: #353535;
	}
</style>
<body ontouchstart>
    <div class="fixed-top">
		<div class="weui-header weui-btn_primary"> 
			<div class="weui-header-left"><a id="btnBack" class="icon icon-109"></a></div>
			<div class="weui-header-title">患者评价</div>
			<div class="weui-header-right"></div>
		</div>
    </div>
	<div class="block weui-cells">
	</div>
</body>
</html>